PREFIX=		/usr/local
BINDIR=		$(PREFIX)/bin
MANDIR=		$(PREFIX)/share/man

CFLAGS=		-Wall -ansi -pedantic
CFLAGS+=	-O2
#CFLAGS+=	-ggdb

# Modern Unixes should run OK on this. On Linux use /dev/urandom (won't block)
CFLAGS+=	-DDEVRANDOM=\"/dev/random\"

shuffle: shuffle.c
	$(CC) $(CFLAGS) shuffle.c -o shuffle

install: shuffle
	install -d $(BINDIR)
	install shuffle $(BINDIR)
	install -d $(MANDIR)/man1
	install -m 644 shuffle.1 $(MANDIR)/man1

shuffle.ps: shuffle.1
	groff -man shuffle.1 > shuffle.ps

clean:
	rm -f shuffle shuffle.ps *~
